import  axios from  "./axios";


let leaveModel = {
    add:(data:any)=>{ //因为login请求是post请求
        return  axios({
            method:"post",
            url:"/api/leave/add",
            headers:{
                token:window.localStorage.getItem("token") as string
            },
            data
        })
    },
    student:(params?:any)=>{
        return  axios({
            method:"get",
            url:"/api/leave/student",
            headers:{
                token:window.localStorage.getItem("token") as string
            },
            params
        })
    }
}

export  default leaveModel;